package com.syj.usemybatisplus.config;

import org.mybatis.plus.mybatisplus.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.mybatis.plus.mybatisplus.mapper.DBType;

/**
 * @author ShiYunJie
 * @className MybatisPlusConfig
 * @description MybatisPlus架包的基本配置
 * @date 2019/3/23 13:35
 * @Version 1.0
 */
@Configuration
@MapperScan("com.syj.usemybatisplus.mapper")
public class MybatisPlusConfig {
    @Bean
    public PaginationInterceptor paginationInterceptor() {
//        return new PaginationInterceptor();
        PaginationInterceptor page = new PaginationInterceptor();
        page.setDialectType(DBType.ORACLE.getDb());
        return page;
    }
}
